<template>
  <header class="header">
    <div class="header-wrap container">
      <h1 class="header-name">
        <router-link to="/">{{ title }}</router-link>
      </h1>
      <ul class="header-navs">
        <li
          v-for="(item, index) in menus"
          :key="index"
          class="header-navs__item"
        >
          <router-link :to="item.path">{{ item.name }}</router-link>
        </li>
      </ul>
    </div>
  </header>
</template>

<script>
export default {
  props: {
    data: {
      type: Array,
      default: () => []
    }
  },
  data() {
    return {
      title: 'triangle-element-ui',
      menus: [
        { path: '/', name: '指南' },
        { path: '/', name: '组件' },
        { path: '/', name: '主题' }
      ]
    };
  },
  watch: {},
  computed: {},
  methods: {
    // 加载数据
    getData() {}
  }
};
</script>

<style lang="scss" scoped>
.header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba($color: #000000, $alpha: 0.08);
  &-wrap {
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
  }

  &-name {
    color: #464646;
    font-size: 20px;
    text-transform: uppercase;
    line-height: 60px;
  }

  &-navs {
    height: 100%;
    display: inline-flex;
    justify-content: flex-end;

    &__item {
      height: 100%;
      margin-left: 30px;
      line-height: 60px;

      a {
        color: #464646;
        font-size: 14px;

        &:hover {
          color: royalblue;
        }
      }
    }
  }
}
</style>
